import { defHttp } from "/@/utils/http/axios";

enum Api {
  list = '/finance/caishuiRefundRecord/list',
  save='/finance/caishuiRefundRecord/add',
  statusOne = '/finance/caishuiRefundRecord/statusOne',
  exportXls = '/finance/caishuiRefundRecord/exportXls',
  queryBusinessBankInfo = '/finance/caishuiRefundRecord/queryBusinessBankInfo',
}

/**
 * 导出api
 * @param params
 */
export const getExportUrl = Api.exportXls;

/**
 * 列表接口
 * @param params
 */
export const list = (params) => defHttp.get({ url: Api.list, params });

/**
 * 提交、撤销
 * @param params
 */
export const statusOne = (params) => {
  return defHttp.get({ url: Api.statusOne, params }, { isTransformResponse: false });
};

/**
 * 保存或者更新
 * @param params
 * @param isUpdate
 */
export const saveOrUpdate = (params, isUpdate) => {
  let url = isUpdate ? Api.save : Api.save;
  return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

/**
 * 查询付方信息及收方信息
 * @param params
 */
export const queryBusinessBankInfo = (params) => {
  return defHttp.get({ url: Api.queryBusinessBankInfo, params }, { isTransformResponse: false });
};
